'''一键备份的话,还是用这个吧,比较简单.备份日期在注释中.
即使文件路径有非gbk文字也行,不过是最简单的zip备份.'''

import sys

import FileFilter
import ZipBackup

## 参数设定,时间格式为"%Y-%m-%d %H:%M:%S"
BACKUP_DIR = 'D:\MyDocument\MyNote'
#BACKUP_DIR = r'F:\Vedio\_VedioBackup'
START_TIME = '2019-8-3 10:59:2'
END_TIME = '2019-8-11 15:06:00'

## 选择备份文件,生成备份资料
ff = FileFilter.FileFilter(BACKUP_DIR, START_TIME, END_TIME)
ff.main()

## 打包成纯打包的zip文件
zipRoot = BACKUP_DIR.split('\\')[-1]+'_backup'
zipFilepath = sys.path[0]+'\\'+zipRoot+'utf8test.zip' # 这里手动指定备份文件名
#zipFilepath = sys.path[0]+'\\'+zipRoot+'until190811.rar'
zb = ZipBackup.ZipBackup(zipFilepath,zipRoot)
zb.main()

## 完成
print('一键备份完成!得到的目标文件是:', zipFilepath)